package org.example.homepage.controller;

//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.experimental.Accessors;
import org.example.common.constants.AppConstants;
import org.example.common.entity.Homepagenavigation;
import org.example.common.entity.Result;
import org.example.homepage.service.HomepagenavigationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/HomePage")
@Accessors(chain = true)
@Tag(name="首页导航",description = "首页导航数据控制类")
public class HomepagenavigationController {
    @Autowired
    private HomepagenavigationService homepagenavigationService;

    @GetMapping("/select")
    @Operation(summary = "查询导航所有数据")
    public Result<List<Homepagenavigation>> SelectList(){
        return Result.success(AppConstants.SUCCESS_MESSAGE,homepagenavigationService.list());
    }
}

